package com.yyg.boot.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description URL路径访问规则
 * @Author 一一哥Sun
 * @Date Created in 2020/3/21
 */
@Controller
public class WelcomeController {

    /**
     * produces="application/json;charset=UTF-8":解决继承WebMvcConfigurationSupport类时中文乱码的问题.
     */
    @ResponseBody
    @GetMapping(value="/show",produces="application/json;charset=UTF-8")
    public String showMsg() {
        return "听一一哥讲解URL路径访问规则...";
    }

}
